#pragma once
#include <cstddef>
#include <map>
#include <string>
namespace lcir {
class Value;
class Argument;
class Lambda;
class Constant;
class VReg;
class Expression;
class ValuePrinter {
  std::map<const Value *, size_t> valueToIdx;
  std::map<const Value *, std::string> argToName;
  Value *root{nullptr};
  size_t ssaIdx = 1;

public:
  // 使用Value初始化ValuePrinter
  ValuePrinter(const Value *value);
  // 重新设置
  // void reset();
  std::string print(const Lambda*);
  std::string print(const Constant*);
  std::string print(const Argument*);
  std::string print(const VReg*);
  std::string print(const Value*);
  std::string print(const Expression*);
  std::string getVregIdx(const Value *value);
  std::string print();
};
} // namespace lcir